As a technique for processing many data entries that are collected every moment from various sources in a parallel manner, there is CEP (complex event processing). In the complex event processing, an event is detected from received data, and processing relating to the detected event is performed. There is a case where the complex event processing is called ESP (event stream processing). In description presented below, the ESP is assumed to be included in the technical scope of the CEP.
In a CEP system that performs the complex event processing, there is a case where a large amount of received data is temporarily processed. In such a case, the processing load of a device that processes the received data in the CEP system increases, and accordingly, the processing performance decreases.
Thus, for example, in the CEP system, by using a technique enabling flexible resource allocation such as a cloud technique, the processing is distributed to a plurality of servers or VMs (virtual machines) in accordance with a variation in the processing load. As such distribution of the processing, for example, a transaction requesting sentence called a query and data accompanied with the query that are arranged in a server or a virtual machine having a high processing load are moved to another server or another virtual machine as processing elements, whereby the distribution of processing is performed.
In addition, there is a technique in which queries of which the processing order is adjacent to each other, in other words, queries that are adjacent to each other in a query graph are distributed to the same device based on the query graph that includes information such as a processing order set in the query.
As for the related techniques, see: U.S. Patent Application Publication No. 2009/0049187; U.S. Patent Application Publication No. 2009/0319687; Mehul A. Shah, Joseph M. Hellerstein, Sirish Chandrasekaran and Michael J. Franklin, “Flux: An Adaptive Partitioning Operator for Continuous Query Systems,” ICDE, 2003; Ying Xing, “Load Distribution for Distributed Stream Processing,” EDBT, 2004 WORKSHOPS; and Ying Xing, Stan Zdonik, Jeong-Hyon Hwang, “Dynamic Load Distribution in the Borealis Stream Processor,” ICDE, 2005, for example.
However, according to the above-described technique, there is a problem in that it is difficult to suppress an increase in communication between devices. Hereinafter, a specific example will be described. First, an example of the above-described technique for distributing processing will be described.
FIGS. 35A and 35B are diagrams for illustrating examples of the above-described technique for distributing the processing. FIG. 35A illustrates an example of a query graph that illustrates the connection relation of queries. The query graph of the example illustrated in FIG. 35A represents that query Q2 is executed using an execution result of query Q1. In addition, the query graph of the example illustrated in FIG. 35A represents that query Q3 is executed using an execution result of query Q2. Furthermore, in the examples illustrated in FIGS. 35A and 35B, queries Q1 and Q3 are arranged in a server 90, and query Q2 is arranged in a server 91. In the examples illustrated in FIGS. 35A and 35B, the server 90 transmits the execution result of query Q1 to the server 91 in which query Q2 is arranged. In addition, in the examples illustrated in FIGS. 35A and 35B, the server 91 transmits the execution result of query Q2 to the server 90 in which query Q3 is arranged. In this way, in the examples illustrated in FIGS. 35A and 35B, when queries Q1 to Q3 are executed, the transmission of an execution result between the servers 90 and 91 is performed twice.
Next, an example of a technique for arranging the above-described queries that are adjacent to each other in the same device will be described. FIGS. 36A and 36B are diagrams that illustrate an example of a technique for arranging the above-described queries adjacent to each other in the same device. FIG. 36A illustrates an example of a query graph that illustrates the connection relation between queries. The query graph of the example illustrated in FIG. 36A illustrates that queries Q2 and Q3 are executed using an execution result of query Q1. In addition, the query graph of the example illustrated in FIG. 36A illustrates that query Q3 is executed using an execution result of query Q2. Furthermore, in the examples illustrated in FIGS. 36A and 36B, queries Q1 and Q2 are arranged in a server 90, and query Q3 is arranged in a server 91 in accordance with the adjacency relation of queries that is represented by the query graph. Here, it is assumed that the number of times of transmitting a processing result from the device in which query Q1 is arranged to the device in which query Q3 is arranged is more than that of transmitting a processing result from the device in which query Q1 is arranged to the device in which query Q2 is arranged. In such a case, in the examples illustrated in FIGS. 36A and 36B, since queries Q1 and Q2 are arranged in the same server 90, the server 90 does not transmit an execution result between queries Q1 and Q2. However, in the examples illustrated in FIGS. 36A and 36B, the server 90 transmits the execution result of query Q1 to the server 91 in which query Q3 is arranged. As above, in the examples illustrated in FIGS. 36A and 36B, when queries Q1 to Q3 are executed, execution results are transmitted between the servers 90 and 91.
Therefore, according to the above-described technique, it is difficult to suppress an increase in communication between the devices.